package com.maxvision.mybatis.factory;

import com.maxvision.mybatis.role.RootAdminRole;
import com.maxvision.mybatis.service.IRoleService;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * 类说明
 *
 * @author HuangRongFu
 * @date 2023/3/20
 */
public class RoleFactory {
    
    static Map<String, IRoleService> map = new HashMap<>();
    
    static {
        map.put("rootAdmin", new RootAdminRole("rootAdmin"));
        map.put("dev", new RootAdminRole("devRootAdmin"));
        map.put("test", new RootAdminRole("testRootAdmin"));
    }
    
    public static IRoleService getOP(String roleName){

        return map.get(roleName);
    }
}
